Ami2D

Two Dimensional Finite Element Analysis for the Amiga

Edition 1.1, for Ami2D Version 2.0 September 1994

Russell Leighton

Copyright \begin{matrix}c \\ ◯ \end{matrix} 1992,1993,1994 Russell Leighton

This is the second edition of the Ami2D documentation.

Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies.

Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one.

Ami2D Copying Conditions

Permission is granted to any individual or institution to use, copy, and distribute this software, provided that the copyright and permission notice is maintained, intact, in all copies and supporting documentation. The original distribution of this software must remain intact and specifically must include all documentation, supporting software/data, and disclaimer.

No charge may be made for distribution, except for costs of media and/or shipping.

2 Ami2D 2.0

Disclaimer

This software is provided on an “as is” basis without expressed or implied warranty. The author of this code and documentation takes no responsibility for inappropriate use of this code and does not warrant the code in any fashion. In other words, use of this code is done solely at the users risk and any problems resulting due to misuse or coding errors is strictly the users responsibility.

This code was developed for research and educational uses. Any other use of this code (particularly in the areas of design and analysis of direct or indirect man-rated systems) without prior verification of the software on similar problems is strongly discouraged. The author of this code is not responsible or liable for any consequences or results that occur from the use (or misuse) of this code.

This code and associated document(s) and/or portions of the material and data furnished herewith, was developed under sponsorship of the U.S. Government. Neither the U.S. nor the U.S.A.F., nor the Phillips Laboratory, nor their employees, nor their respective contractors, subcontractors, or their employees, makes any warranty, expressed or implied, or assumes any liability or responsibility for accuracy, completeness or usefulness of any information, apparatus, product or process disclosed, or represents that its use will not infringe privately-owned rights. Mention of any product, its manufacturer, or suppliers shall not, nor is it intended to, imply approval, disapproval, or fitness for any particular use. The U.S.A.F. and the Phillips Laboratory at all times retain the right to use and disseminate same for any purpose whatsoever.

4 Ami2D 2.0

1 Introduction

Ami2D forms the core of a collection of codes developed to perform various analyses on structures using the finite element technique. Specifically, Ami2D is a pre/post-processor used to create two dimensional finite element models and to interpret the results from subsequent solutions. It was developed to handle both “plane” and axisymmetric two dimensional finite element analysis problems. It is a fairly general capability in the sense that a wide variety of two dimensional problems can be modeled by Ami2D. Other codes are included to provide a fairly complete analysis capability. These codes include the solvers (see Appendix B [Lin2D], page 45 and Appendix C [Nln2D], page 49), a node equivalence code (see Appendix E [Equ2D], page 53), a node order optimizer (see Appendix F [Opt2D], page 55), and a couple of ancillary codes (see Appendix H [Rexxcon], page 59 and Appendix I [Rexxbar], page 63). Of course, the user is free to utilize other utility codes to enhance the operation and functionality of this collection.

The main features of the Ami2D collection are as follows:

• may be run in the background or interactively

• two-dimensional plane or axisymmetric problems

• cartesian or polar coordinate systems

• uses ARexx macro language

• linear and quadratic isoparametric elements available

• no limit on number of nodes, elements, materials, or boundary conditions (only limited by memory)

• no need to specify problem size (determined at run time)

• group (part) definition/manipulation

• Dirichlet (constraint) or Neumann (flux), point or distributed boundary conditions

• globally or locally referenced material properties

• laminated materials

• graphical interface

• definable post-processing functions

• command aliases for customized uses

• linear and nonlinear (geometric) solvers provided

• solvers use a symmetric banded matrix storage format

• solvers can handle coupled analyses

• node order optimizer for bandwidth reduction

• node equivalence code for part “welding”

6 Ami2D 2.0 • ancillary codes provided for integrated, interactive environment

2 Command Reference

This chapter is included as a reference to the commands available for use in ARexx macros.

2.1 Macros and Syntax

Ami2D accepts ARexx commands passed to its message port (address ami2d). These include all necessary commands to completely define the two dimensional finite element model, material properties, and boundary conditions. It is possible (and often most desirable) to create a model completely from these commands (saved in an ARexx macro file). However, it is also possible to create a complete model interactively through the graphical interface provided in the Ami2D pre/post-processor. The model, in either case, should then be saved to a binary model file which can then be read back into Ami2D at a later time or read into and processed by a solver (see Appendix B [Lin2D], page 45 and Appendix C [Nln2D], page 49), post-processor (see Appendix D [Post2D], page 51), or other utility codes. In turn, the results produced by other codes can be saved back into the model file which in turn can be graphically displayed by Ami2D. The complete process can be performed in an integrated, interactive session using some ancillary codes developed to interface these processing codes. A good example of how Ami2D can be used in an interactive mode is through the use of the ARexx macro ‘ami2d.rexx’ provided. Use of this macro will be discussed later.

In general the command line syntax for executing Ami2D as a stand-alone program is:

         -> [run] Ami2D [script]

where script is the name of an input ARexx script to be processed. If no script is specified then the code will wait until it receives a command, presumably from a subsequently executed ARexx command or script.

Commands for Ami2D, placed in an ARexx macro, consist of a command keyword followed by arguments. The arguments may be separated from the command keyword with parentheses and delimited with commas (analogous to a function call) or may be separated (and delimited) with spaces. If parentheses and commas are used then the command line must be surrounded by single quotes or else ARexx will interpret the command as a library function call (rather than a command meant for the host). The use of spaces to delimit the command keyword and arguments is recommended for most commands, however, the use of parentheses and commas is recommended when defining aliases (see Section 2.7 [Utility Commands - alias], page 16). Also any expressions that are meant to be evaluated internally by Ami2D should be surrounded by single quotes (see Section 2.7 [Utility Commands - set], page 16). For example, the lines below show a sequence of ARexx commands for Ami2D.

/* this is a simple example of an ARexx macro for Ami2D */
address ami2d
set 'struct 0'
set 'la=a2*a3/((1+a3)*(1-2*a3))'
set 'mu=a2/(2*(1+a3))'
alias 'iso=mat(a1,0,0,la+2*mu,la+2*mu,la+2*mu,mu,la,la,0.0,la)'
alias 'quad4=elem(a1,a2,4,4,a3,a4,a5,a6)'
reset
problem 'struct'
axisym
iso 1 1.0 0.0
h = 0.25
do i=0 to 4
    do j=1 to 5
        k = i*5 + j
        node k j*h i*h
    end
end
do i=0 to 3
    do j=1 to 4
        k = i*4 + j
        n = i*5 + j
        quad4 k 1 n n+1 n+6 n+5
    end
end

Note that the alias and set commands always require expressions as arguments (to be evaluated internally by Ami2D) and, therefore, the arguments must be surrounded by single quotes. Also note that in the problem command the argument is also surrounded by single quotes since 'struct' is an internally defined variable (which is not known to ARexx). The general rule is to surround expressions (which can be single variables), which are to be interpreted internally by Ami2D, with single quotes. Otherwise, expressions (and variables) will be interpreted by ARexx before being sent

to Ami2D.

The above example shows the command node k j*h i*h where i, j, k, and h are ARexx variables. In the first pass through the loop containing this command the actual command line issued to Ami2D is node 1 0.25 0.0 which results in the creation of node 1 at coordinates (0.25,0.0). For further details on the ARexx macro language the interested reader should refer to texts (see Chapter 5 [References], page 37) that specifically address the ARexx language. ARexx is a complete macro programming language and as such cannot not be described in adequate detail here. The following section, however, describes the commands available within ARexx macros for use with Ami2D. A detailed example is also included in a later chapter.

It is important to note that all identification numbers are one based. That is all material, node, element and element side identification numbers must start at one or greater. The use of zero is reserved to flag interactive specification (which will be discussed later) and will cause an error if used in a non-interactive session.

Most examples shown (as well as most of the commands in the scripts included) use parentheses and commas to delimit commands and arguments. However, this is done only for clarity. In addition, to help clarify commands as well as to demonstrate the flexibility of the codes, many of the examples show the use of the alias and set commands. It is through the use of these commands that Ami2D can be tailored to many different engineering applications. More on this will be discussed later.

2.2 Problem Type

These commands specify the kind of problem to be modeled and the type of assumption used to restrict the problem to two dimensions.

Command problem kind ndof problem requires an argument specifying the kind of problem. The problem kind can be set to any desired value. This value is used to associate materials, boundary conditions and solutions (with the kind corresponding to the problem kind). The second argument (ndof ) may be used to specify the number of degrees of freedom per node. For instance, in structural problems (in two dimensions) two displacements for each node are the degrees of freedom. In thermal (heat conduction) problems one temperature for each node is solved for. If this argument is not given then it is assumed that for a problem kind set to an even number the degrees of freedom is set at two, otherwise, it is assumed to be one.

          'set thermal=1'
          'problem(thermal)'

Command plane

plane is used to specify a “plane” assumption (i.e. the problem solution is independent of the out-of-plane direction). There are no arguments to plane.

Command axisym

axisym is used to specify an axisymmetric assumption (i.e. the problem solution is independent of the circumferential direction). There are no arguments to axisym.

2.3 Materials

The following commands are used for specification of material properties.

Command mat id type kind C[10] ckind f[2] ref ckind f[2] ref mat requires specification of the material identification number (id), material type, material kind, material coefficients (C[10]), and two sets of body force terms consisting of couple problem kind (ckind), body force coefficients (f[2]), and reference value (ref ).

The material type currently has two possible meaningful values. If the value is set to zero (0) then the material properties are referenced to the global coordinate system. If the value is set to one (1) then the material properties are referenced to the local element coordinate system (see Section 2.4 [Geometry], page 11). The latter choice is useful for defining non-isotropic material properties whose principal orientation varies with element orientation (for example, a filament wound composite bottle) and is especially useful when used in conjunction with the lam command (see Section 2.3 [Materials - lam], page 10).

The couple problem kind may be specified in order to couple the solution from a previous analysis with the body force coefficients used in the current analysis. If no coupling is desired then these values should be set to the material kind. The body force coefficients are used to define properties associated with body forces. The reference value can be used to specify a reference temperature, species concentration, etc. A reference temperature, for example, could be used to determine a change in temperature due to heat conduction thereby coupling the solution obtained from a heat transfer analysis with a structural analysis.

The use of these values is dependent on the solver (see Section B.2 [Lin2D - Model Requirements], page 46) used to calculate a solution. Therefore, to determine what is required for input the documentation for the specific solver must be consulted.

     'set la=a2*a3/((1+a3)*(1-2*a3))'
     'set mu=a2/(2*(1+a3))'
     'alias iso=mat(a1,0,0,la+2*mu,la+2*mu,la+2*mu,mu,la,la,0.0,la)'
     'iso(1,10.e6,0.32)'

Command lam id kind mid frac mang lam requires specification of the laminate identification number (id), material kind, reference material identification (mid), fraction of laminate (frac), and lamina material angle (mang).

This command is used to define a laminate by building up laminae. Each lamina is defined by a single instance of lam. Subsequent lam commands issued with the same laminate identification number will add laminae to any current laminate sequence. The material kind specified is used to define the overall laminate material kind as well as to define the expected material kind for the reference material. The reference material identification number must refer to an existing material. It is assumed that the reference material is at most a transversely isotropic material (the material properties are invariant only in the 2-3 plane). This also implies that the primary (1) direction is the principal material direction (the stiffer or fiber direction). The frac argument is used to specify the fraction that this lamina takes in the overall thickness of the laminate. The total sum of all the frac arguments for every lamina defined in the laminate should equal 1.0. The lamina material angle (mang) is used to define the fiber orientation (in the 1-3 material plane). This material angle may be defined as a constant value or as a function specified by name (previously defined by the set command, see Section 2.7 [Utility Commands - set], page 16). This capability to specify a function for the fiber angle can be used to effectively model filament wound composite pressure vessels with domes where the fiber angle varies with position along the dome.

     'set fang1=asin(1.7365/r0)'
     'set fang2=-fang1'
     'lam 2 0 8 1/2 fang1'
     'lam 2 0 8 1/2 fang2'
     'lam 7 0 8 1/3  20.0'
     'lam 7 0 8 1/3 -20.0'
     'lam 7 0 8 1/3 90.0'

Figure 1 – Element Maps

2.4 Geometry

The following commands are used to create the geometry of the model in terms of nodes and elements. For element specification the nodes must be specified in the order shown in figure 1.

Command node id x y

node will create a node located at a specified coordinate. The arguments are the node identification number (id) and the coordinate pair (x, y). The coordinate pair is interpreted depending on the coordinate setting (see Section 2.7 [Utility Commands - coord], page 16). If the coordinate is not given then the node will be placed at (0,0). However, if the screen is open (see Section 2.8 [Graphic Interactive Commands - open], page 25) then the node will be placed at the selected location (using the mouse pointer). If the identification number is not given (or is zero) the next largest node number will be used.

     'node(1,0.5,1.0)'

Command elem id mat nnodes nint nodes[9] elem is used to create elements based on isoparametric shape functions. The required arguments are the element identification number (id), material identification number (mat, referring to an existing material), number of nodes (nnodes), number of integration points (nint) and the node numbers (nodes[9], also referring to existing nodes). The following are possible element specifications.

nnodes  nint   order       shape    integration rule
3     1   linear      tri      1 point
6     1   quadratic   tri      1 point
6     3   quadratic   tri      3 point
4     1   linear      quad     1 point
4     4   linear      quad     2x2 point
8     1   quadratic   quad     1 point   (not recommended)
8     4   quadratic   quad     2x2 point
8     9   quadratic   quad     3x3 point
9     1   quadratic   quad     1 point   (not recommended)
9     4   quadratic   quad     2x2 point
9     9   quadratic   quad     3x3 point

If any node numbers are not specified and the screen is open (see Section 2.8 [Graphic Interactive Commands - open], page 25) then the node (or nodes) can be selected using the mouse pointer (in the correct order). If the material number is not given then material one will be used. If the identification number is not given (or is zero) the next largest element number will be used. It should be pointed out that some combinations of element order and integration order result in element instabilities whose effect can be highly dependent on the problem being solved (see Section 3.2 [Element Instability], page 31 for more information).

'alias quad4=elem(a1,a2,4,4,a3,a4,a5,a6)'
'quad4(1,1,1,2,3,4)'

2.5 Boundary Conditions

The following commands allow specification of the boundary conditions. A sufficient specification of the boundary conditions is necessary to result in a solvable problem. If during the solve phase of the analysis an error occurs it is most likely due to insufficient or improper application of boundary conditions.

Command pbc node type kind dir val pbc specifies boundary conditions applied at nodes. This boundary condition may be either a Dirichlet or flux type boundary condition. The first argument is the identification number for the node at which the boundary condition is applied (node). If zero is input and the screen is open (see Section 2.8 [Graphic Interactive Commands - open], page 25) then the node is selected using the mouse pointer. The second argument is used to specify the type of boundary condition. A Dirichlet boundary condition is type 1. A flux boundary condition is type 2. The next argument specifies the kind of boundary condition and should correspond to the problem kind. Different kinds of boundary conditions may be applied to a single node. The appropriate boundary condition will be selected by the solver (see Appendix B [Lin2D], page 45 and Appendix C [Nln2D], page 49) depending on the problem kind being solved. Also, depending on the currently specified problem kind Ami2D will display only the corresponding boundary conditions. The next argument is used to specify the global direction (dir) for the boundary condition. For scalar boundary conditions use 1. For vector boundary conditions use 1 or 2 to specify the global direction (1 for x or r, 2 for y or z). The last argument is the boundary condition value (val). If not specified then the boundary condition will be removed (if it exists).

     'alias dispx=pbc(a1,1,0,1,a2)'
     'dispx(5,0.0)'
     'alias forcr=pbc(a1,2,0,1,a2)'
     'forcr(10,100.0)'
     'alias temp=pbc(a1,1,1,1,a2)'
     'temp(2,77)'

Command dbc elem type kind dir side val[3] dbc specifies boundary conditions applied along element sides. This boundary condition may be either Dirichlet or flux type boundary conditions. The first argument is the identification number for the element (elem). The second argument is used to specify the type of boundary condition. A Dirichlet boundary condition is type 1. A flux boundary condition is type 2. The next argument specifies the kind of boundary condition and should correspond to the problem kind. Different kinds of boundary conditions may be applied to an element side. The appropriate boundary condition will be selected by the solver (see Appendix B [Lin2D], page 45 and Appendix C [Nln2D], page 49) depending on the problem kind being solved. Also, depending on the currently specified problem kind Ami2D will display only the corresponding boundary conditions. The next argument is used to specify the local direction dir for the boundary condition. For scalar boundary conditions use 1. For vector boundary conditions use 1 or 2 to specify the local direction (1 for normal to element side, 2 for tangent to element side). The next argument is the element side number. If zero is input for the element number and the screen is open (see Section 2.8 [Graphic Interactive Commands - open], page 25) then the element is selected using the mouse pointer. If the side number is also input as zero then the side closest to the point where the element was selected will be used. The succeeding arguments specify the value of the boundary condition at each nodal location (val[3]). If one value is specified the boundary condition value is assumed to be constant across the element side. If two or more values are given the value will vary either linearly or quadraticly depending on the order of the element. If no values are specified then the boundary condition will be removed (if it exists).

     'alias press=dbc(a1,2,0,1,a2,a3)'
     'press(20,1,-1000.0)'
     'alias slope=dbc(a1,1,0,1,a2,a3)'
     'slope(12,3,0.0)'

2.6 Results Processing

These commands are included to evaluate results as specific locations as well as to select result functions for processing through an external post-processor (see Appendix D [Post2D], page 51).

Command select function location Given a solution calculated by a solver (see Appendix B [Lin2D], page 45 and Appendix C [Nln2D], page 49) select will select functions to be subsequently used to post-process the solution (see Appendix D [Post2D], page 51). Any previously defined function (see Section 2.7 [Utility Commands - set], page 16) may be given in the first argument. The second argument indicates where the solution will be evaluated in each element (location). If gauss is specified then the solution will be processed at the Gaussian quadrature points. If node is specified then processing will occur at the node locations. Finally, if ave is specified then the solution will be processed at the nodes and averaged across element boundaries (unless it is a material boundary). If this argument is not given then gauss is assumed. More accurate stress/strain results (for that matter any result based on solution derivatives) can be expected using the gauss option. No results are actually calculated until the model is processed through the post-processor.

     'set flux=-c1*(x1*x1+y1*y1)^0.5'
     'select(flux,ave)'

Command eval expr elem np xi yi Given a solution calculated by a solver (see Appendix B [Lin2D], page 45 and Appendix C [Nln2D], page 49) eval is used to evaluate the solution at specified locations. Any valid expression (see Section 2.7 [Utility Commands - set], page 16) may be given in the first argument (expr). The second argument, if given, specifies the element (elem) by order number (greater than or equal to zero) or by identification number (less than zero). The third argument (np) indicates either the local node number (greater than zero), the Gaussian quadrature point (less than zero) or if given as zero the next two arguments are used to specify the local coordinates (see Section 2.4 [Geometry], page 11). If the element number (and all subsequent arguments) are not given then the expression will be evaluated as a stand-alone expression (no solution values will be valid). In this way eval may be used as an online calculator (though somewhat limited). If the third argument (and all subsequent arguments) are not given and the screen is open (see Section 2.8 [Graphic Interactive Commands - open], page 25) then the location for solution evaluation is given by selecting it with the mouse. The computed value for the specified location and the expression given is returned in RESULT (assuming options results is used in the macro).

     'eval(sig1,101,0,0.0,0.0)'

2.7 Utility Commands

These commands are included for additional capability and interactivity.

Command save file

The complete model, problem type, material properties, geometry, boundary conditions, solutions, results, functions and aliases may be saved to a file using save. The file format used is an Interchange File Format (IFF) type developed specifically for this code. It is a binary file format and therefore cannot be edited conventionally. The only argument to this command is the name of the file to store the data. If no argument is given and the screen is open (see Section 2.8 [Graphic Interactive Commands - open], page 25) then a file requester will be displayed.

     'save(ram:model.dat)'

Command read file

The file produced by the save command (see Section 2.7 [Utility Commands - save], page 16) can be read in by read. The only argument to this command is the name of the file containing the data. If no argument is given and the screen is open (see Section 2.8 [Graphic Interactive Commands - open], page 25) then a file requester will be displayed.

     'read(results.dat)'

Command coord system xorg yorg coord sets the coordinate system to either the cartesian or polar coordinate systems. It also allows specification of the coordinate system origin (xorg, yorg). coord affects all commands that accept or return coordinate data. It will also affect the display of coordinates in the screen title bar as well as the grid command if the screen is open (see Section 2.8 [Graphic Interactive Commands - open], page 25). It should be noted that even if a model is not inherently cylindrical many circular features can be modeled more effectively using the polar coordinate system (with an origin offset). The coordinate system may be changed at any point during the modeling process with no effect on previously issued commands.

     'coord(polar,5,5)'

Command cd dir cd changes the directory path used by the read (see Section 2.7 [Utility Commands - read], page 16) and save (see Section 2.7 [Utility Commands - save], page 16) commands. The argument is the new directory path (dir) and must be a complete path specification. If no argument is given then the current directory path will be returned (if it was previously specified).

     'cd(ami2d:test)'

Command reset flag function reset will selectively clear (deallocate) memory. If no arguments are given then all memory will be deallocated except for functions and aliases. This should always be done before starting a new problem. If all is specified for the flag then all memory is deallocated (should only be done when beginning a completely different kind of problem). Specifying solutions, groups, functions or aliases for the flag will deallocate the associated sections of memory. If results is specified for the flag then the next argument (if given) indicates the function name of the result to deallocate. If this argument is not given then all results are deallocated.

Command check

check will perform a check of model integrity. It will check for undefined nodes, elements and materials over elements and boundary conditions. These checks do not insure that the resulting system will be solvable, nor does it insure that element mapping is invertible (a necessary condition). However, if errors occur during formation of the global stiffness matrix that is generally an indication that the mesh is malformed, therefore, check the model for elements that are misshapen or misnumbered. Also, if errors occur in the solver check the boundary conditions for completeness (do not allow rigid body motion or rotation). Model statistics and memory requirements will also be output with this command. There are no arguments to check.

Command info

info gives information on the overall model and optionally on materials, nodes, elements, boundary conditions, solutions, groups and window settings. If no argument is given then the number of nodes, elements, groups and solutions is returned in the ARexx variable RESULT (assuming options results is used).

Command info "mat" n If the first argument is mat then information is returned for the material specified by the second argument. A material is referenced by its identification number and by the currently specified problem kind (see Section 2.2 [Problem Type - problem], page 9). The data returned is the material order number, material id, type, kind, material coefficients (10), and two sets of body force terms consisting of the couple problem kind, body force coefficients (2), and reference value. If the material identification number is not given and the screen is open (see Section 2.8 [Graphic Interactive Commands - open], page 25) then the material is selected using the mouse pointer.

Command info "node" n If the first argument is node then information is returned for the node specified by the second argument. A node can be referred to by its order number or assigned identification number (the number you originally assigned). In this way information can be obtained without knowledge of the original assigned numbering. If the order number is used then the argument must be positive (or zero since order numbers are zero based). Otherwise, negative numbers are interpreted as identification numbers (indicated by the absolute value). If max is specified for the second argument then information will be returned for the node with the maximum identification number. If last is specified then information is returned for the node last defined. The data returned is the order number, node id, and the node x,y coordinates (referenced to the coordinate origin). If the polar coordinate system is set (see Section 2.7 [Utility Commands - coord], page 16) then the coordinate data returned will be in polar form (a radius and angle, referenced to the coordinate system origin). If the node identification number is not specified and the screen is open (see Section 2.8 [Graphic Interactive Commands - open], page 25) then the node is selected using the mouse pointer.

Command info "elem" n If the first argument is elem then information is returned for the element specified by the second argument. An element can be referred to by its order number or assigned identification number (the number you originally assigned, as above). If max is specified for the second argument then information will be returned for the element with the maximum identification number. If last is specified then information is returned for the element last defined. The data returned is the order number, element id, material id, number of nodes, and the node order numbers (not the node ids). If the element identification number is not specified and the screen is open (see Section 2.8 [Graphic Interactive Commands - open], page 25) then the element is selected using the mouse pointer.

Command info "pbc" dof n If the first argument is pbc then information is returned for the point boundary condition on the node specified by the second argument (see above) for the degree of freedom specified. The data returned is the node order number, node id, boundary condition type, kind, degree of freedom, and the boundary condition value. If no boundary conditions (associated with the current problem kind) exist for the node then only the node order number and node identification number are returned. If the node identification number is not specified and the screen is open (see Section 2.8 [Graphic Interactive Commands - open], page 25) then the node is selected using the mouse pointer.

Command info "dbc" dof n side If the first argument is dbc then information is returned for the distributed boundary condition on the element, side, and degree of freedom specified. The data returned is the element order number, element id, element side, boundary condition type, kind, degree of freedom, and the boundary condition values (one for each node along the element side). If no boundary conditions (associated with the current problem kind) exist for the element side then only the element order number, identification number, and side are returned. If the element identification number is not specified and the screen is open (see Section 2.8 [Graphic Interactive Commands - open], page 25) then the element side is selected using the mouse pointer.

Command info "soln" dof n If the first argument is soln then a solution value is returned for the degree of freedom and node specified. The data returned is the node order number, node id, and solution value (associated with the current problem kind). If the node identification number is not specified and the screen is open (see Section 2.8 [Graphic Interactive Commands - open], page 25) then the node is selected using the mouse pointer.

Command info "result" name If the first argument is result then information on results is returned. The second argument (if specified) is the function name of the result. The data returned is the result kind, number of degrees of freedom, location flag, the minimum and maximum computed result values. If the function name is not specified then a list of result function names is returned. If any names are prepended with an * then that result has computed values otherwise the result function is only selected (ready for postprocessing, see Appendix D [Post2D], page 51).

Command info "functions" If the first argument is function then a list of defined function names is returned.

Command info "group" name If the first argument is group then information on groups is returned. The second argument (if specified) is the name of the group. The data returned is the number of nodes contained in the group. If the group name is not specified then a list of group names is returned.

Command info "window" If the first argument is window then data is returned containing the window maximum and minimum coordinates in the form of xmin, xmax, ymin, ymax (as specified in the window command).

Command version

version returns the version and the compilation date and time for Ami2D.

Command stop

stop will signals the code to exit thereby removing the code from memory. Any subsequently issued macros that reference this program will fail unless it is restarted. There are no arguments to stop.

Command set function expr set is used to define functions used to post-process solution data and to store intermediate data for exchange between macros. Pre-defined variable names may be used in the function expression (expr) as well as any other defined function names. Material coefficients may be referenced by using the pre-defined variables, c1 through c10 (the global material properties), which refer to the coefficients as input in the mat command and l1 through l10 (the local lamina material properties) which refer to transformed coefficients referenced to the local element orientation. The latter variables will only be defined for laminates (defined by the lam command) and will vary depending on location within the laminate (the material angle used to transform the properties is obtained from the lamina at the specified location). Also, element and material angles may be used through the predefined variables m1 and m2. The variable m1 will contain the element principal orientation and m2 will contain the lamina material angle (in degrees). Both of these angles will vary with location and are most useful for transforming results to coincide with these natural orientations (for example, they could be used to calculate the fiber stress in a composite laminate). Body force components may be accessed through the pre-defined variables, f1 through f4 (see Section 2.3 [Materials - mat], page 10). Additionally, the variables p1 and p2 are defined as the local parametric coordinates of the element and range from 0.0 to 1.0 (note that these coordinates may be used to interpolate within an element and only make sense when a function is evaluated within an element, see Section 2.6 [Results Processing - eval], page 15). The pre-defined variables for plane (see Section 2.2 [Problem Type - plane], page 9) problems are:

     u# - solution value
     x# - solution derivative with respect to 'x' or 'x' coordinate
     y# - solution derivative with respect to 'y' or 'y' coordinate

The pre-defined variables for axisym (see Section 2.2 [Problem Type - axisym], page 9) problems are:

     u# - solution value
     r# - solution derivative with respect to 'r' or 'r' coordinate
     z# - solution derivative with respect to 'z' or 'z' coordinate
     t# - solution derivative with respect to 't'

Where the # symbol is replaced by the desired degree of freedom or is specified as zero (0) if coordinate values are desired.

The function expression (expr) may be any valid algebraic expression which can contain any combination of operators, pre-defined variables and other defined functions. The expressions may also contain parenthesized sub-expressions, nested to any level. The allowed operators are +, -, *, /, and ^(real exponent). Also built-in functions abs, sin, cos, tan, asin, acos, and atan (which takes two arguments separated by a comma) are available as well as the variable pi. Note that all angle arguments for all functions and the return values from the asin, acos, and atan functions are in degrees.

The function name may be given as the first argument or as the left hand side of the expression separated by an =. The latter option should be used for functions while the previous option should be used for defining constants. Also, no parentheses should be used to delimit the arguments because of possible conflicts with parentheses used in functions.

     'set tau12=(0.25*(sigr-sigz)^2+taurz^2)^0.5'
     'set sigf=cos(m2)*cos(m2)*sigz+sin(m2)*sin(m2)*sigt'
     'set material 2'

Command get function get is used to retrieve a function or alias expression defined by the set (see Section 2.7 [Utility Commands - set], page 16) and alias (see Section 2.7 [Utility Commands - alias], page 16) commands. The argument is the function or alias name. The function or alias expression is returned in the ARexx variable RESULT (assuming that options results was specified in the macro).

     'get(material)'

Command group

The group commands allow for manipulation of groups of nodes and associated elements. In general, groups are composed of nodes only, however, elements and boundary conditions associated with nodes contained in a group will be affected by group manipulation. Group names may be any length, but only the first nine characters are significant.

Command group name "add" n1 n2 The add option is used for group creation. If the group specified (name) does not exist then a new group is created otherwise the existing group will be added to. The two subsequent arguments specify the nodes (by identification number) to be added as a sequence of nodes starting with node n1 and ending with node n2. If n2 is given as zero then all nodes starting at n1 up to the last node in the model will be added. If neither argument is given and the screen is open (see Section 2.8 [Graphic Interactive Commands - open], page 25) then the nodes are selected by use of the mouse. Nodes are selected by dragging rectangles around nodes to be added. To terminate the selection process press the right mouse button.

Command group name "rem" n1 n2 The rem option is used to remove nodes from an existing group (name). This command is not destructive (no nodes are deleted). The two subsequent arguments specify the nodes (by identification number) to be removed as a sequence of nodes starting with node n1 and ending with node n2. If n2 is given as zero then all nodes starting at n1 up to the last node in the model will be removed. If neither argument is given and the screen is open (see Section 2.8 [Graphic Interactive Commands - open], page 25) then the nodes are selected by use of the mouse. Nodes are selected by dragging rectangles around nodes to be removed. To terminate the selection process press the right mouse button.

Command group name "tran" x1 y1 x2 y2 The tran option is used to translate an existing group (name). The subsequent arguments specify the starting coordinate (x1, y1) and ending coordinate (x1, y1) for the translation. These coordinates are specified in either cartesian or polar form depending on the setting given in the coord command (see Section 2.7 [Utility Commands - coord], page 16). It should be noted that the meaning of “translation” is different depending on the coordinate form. In cartesian coordinates a translation is defined as a movement in the global x and y directions. In polar coordinates a translation is defined as a movement in the radial and angular directions. This effectively will result in rotation, translation and scaling in the most general use. This feature can be utilized with great effectiveness if used properly. If no arguments are given and the screen is open (see Section 2.8 [Graphic Interactive Commands - open], page 25) then the two positions are selected by use of the mouse.

Command group name "del" The del option is used to delete nodes contained in an existing group (name). This command is destructive (so beware). All nodes and associated elements and boundary conditions will be deleted from the model.

Command group name "save" The save option is used to save a group (name) to an IFF binary file (see Section 2.7 [Utility Commands - save], page 16). Only nodes and associated elements (elements whose nodes are all contained in the group) are saved.

Command group name "read" The read option is used to read in a group from an IFF binary file (see Section 2.7 [Utility Commands - save], page 16). If the named group (name) exists then the nodes (and elements) read in will be added to the group. If the group does not exist a new group will be created. The node (and element) identification numbers will start after the maximum identification number in the current model (in other words, no nodes or elements will be overwritten).

Command group name "off" The off option is used to remove a group temporarily. If a group is “turned off” most subsequent element operations will ignore elements contained in this group. Additionally, results will not be calculated by the post-processor (see Appendix D [Post2D], page 51) for any of the associated elements. If the model is displayed (see Section 2.8 [Graphic Interactive Commands - plot - fill], page 25) the elements, contained in the group, will be ghosted.

Command group name "on" The on option is used to return a group to the processing list. Subsequent element operations will now effect this group. Additionally, post-processing will result in values being calculated for the associated elements. Note that if results were calculated previously with the group “turned off” then no results are available for the affected group even if the group is “turned on”. In this case, the result function would have to be reselected (see Section 2.6 [Results Processing - select], page 15) and the model post-processed (see Appendix D [Post2D], page 51).

Command alias name expr alias is used to create aliases for built-in commands. In this manner Ami2D may be customized to many different applications. Aliases are defined through the use of the pre-defined variables a1 through a#. These pre-defined variables contain the argument entries of the alias command. For example, the alias iso shown below will have its arguments placed in the pre-defined variables a1 through a3. These arguments are then used in the alias definition as well as in functions used in the alias definition. In this case, an isotropic material definition command was created from the more complex mat command. In actual use the iso alias command might look like the following.

     'set la=a2*a3/((1+a3)*(1-2*a3))'
     'set mu=a2/(2*(1+a3))'
     'alias iso=mat(a1,0,0,la+2*mu,la+2*mu,la+2*mu,mu,la,la,0.0,la)'
     'iso(1,10.e6,0.3)'

Note that functions may be used in aliases with no restrictions (although some uses may not make any sense). Aliases, however, may not be used in other aliases or functions. Also note that functions containing the pre-defined variables a1 through a# only make sense when used with aliases.

Command why

why will return the last error message associated with an error condition in the ARexx variable RESULT (assuming options results is used in the macro). If an error occurs the ARexx variable RC will contain a severity level. Refer to references on the ARexx language for details on error handling (see Chapter 5 [References], page 37). Upon receiving an error condition this command can be used to help determine what error actually occurred.

2.8 Graphic Interactive Commands

The following commands comprise the graphical interactive interface builtin to Ami2D. Of course, all previously discussed commands will also function, but these commands (except open and window) are only valid for use with the public screen opened by the open command.

It should be noted that most interactive commands may be aborted by pressing the right mouse button. This includes all previously discussed model creation commands.

Command open xoff yoff mode open will open the public screen for Ami2D. The name of the screen is AMI2D (what else) and can be accessed by other applications. Typically, this command will only be used from within a startup macro (see ‘ami2d.rexx’ for an example of a startup macro for Ami2D). The size of the screen will be set to the maximum display size and the depth of the screen will be 4 bit-planes (16 displayable colors). The arguments to this command specify offsets (xoff, yoff ) to the root window (i.e. the area where all graphics are rendered) left hand side and top edge in pixels. If either offset is negative then the offset will be relative to the right hand side and bottom edge respectively. The window will also be reduced by the amount of the offsets. This allows for placement of other windows without obscuring the display.

The argument, mode allows specification of the display mode to use for the screen. If not specified then the display mode that the Workbench is set to will be used.

If no arguments are given then the screen will be opened (if it is not already open) with the offsets set to zero and the display mode set to match the Workbench. If the screen was previously opened (and no arguments are given) then the size of the screen is returned in RESULT. If offsets are given and the screen has been previously opened then the root window will be adjusted accordingly.

     'open(50,40)'
     'open(-68,-50,PICASSO:1024x768)'

Command close

close will close the public screen, if possible. The screen will not close if visiting windows are still open on the screen. This command will have to be reissued, if the screen could not be closed, after all visiting windows are closed. There are no arguments to this command.

Command view id scale view will open or select a view on the public screen. The first argument is used to specify the identification number (1 - 9) for the view and also serves to initially place the view. If this argument (and following argument) are not specified then the root window will be selected. If the scale argument is given then a new view will be opened (closing any existing view with the same identification number) at the scale specified. If zero is given for the scale then the view will be closed. Any subsequent graphics output will be directed to the currently selected view. Any interactive graphical input will always be referenced to the root window.

Command plot

Command plot "model" plot will plot the nodes and elements of the model. If no arguments are specified then the model will be plotted.

Command plot "deform" scale If deform is specified for the first argument then displacements (actually, any solution with two degrees of freedom will be treated as displacements by this command, so beware) are added to the nodal coordinates. Optionally, a third argument specifies a deformation scale which by default is 1 (giving actually deformation).

     'plot(deform,2.0)'

Command plot "bcs" If bcs is specified for the first argument then all boundary conditions are plotted.

     'plot(bcs)'

Command plot "bound" If bound is used then free boundaries (unconnected element edges) will be highlighted. The last option is useful for determining if any nodes need to be equivalenced (see Appendix E [Equ2D], page 53).

     'plot(bound)'

Command plot "result" fun1 fun2 subd rmin rmax If result is specified for the first argument then results will be plotted within each element. The first result function specified (fun1) is assumed to be a magnitude with the second (fun2) assumed to define a direction. The combination of these two results are plotted as vectors with corresponding magnitude (indicated by color) and direction. The specified result functions must have been previously processed (see Appendix D [Post2D], page 51). A direction result is assumed to have units of degrees (such as would be returned by the atan builtin function, see Section 2.7 [Utility Commands - set], page 16). If an element subdivision (subd) is given and the results were processed at the nodes (see Section 2.6 [Results Processing - select], page 15) then each element is subdivided into equal regions each of which will have a vector plotted at the centroid corresponding to the interpolated result at that location. If results were processed at the Gaussian quadrature points then vectors will only be plotted at those points within each element (and this argument will be ignored. If this argument is not specified then 0 is assumed. Finally, a range of values may be given by specifying the minimum (rmin) and maximum (rmax) result values. If not given then the range is set to include the the full range of values processed.

     'set flux=-c1*(x1*x1+y1*y1)^0.5'
     'set fdir=atan(y1,x1)'
             .
             .
             .
     --- run Post2D ---
             .
             .
             .
     'plot(result,flux,fdir,2)'

Command fill

Command fill "model" fill will plot the elements of the model and fill them with a color dependent on the material assigned to the element or results computed. If no arguments are specified then the model will be plotted.

Command fill "deform" scale If deform is specified for the first argument then displacements (actually, any solution with two degrees of freedom will be treated as displacements by this command, so beware) are added to the nodal coordinates. Optionally, an additional argument specifies a deformation scale which by default is 1 (giving actually deformation).

     'fill(deform,2.0)'

Command fill "result" fun comb rmin rmax If result is specified for the first argument then the elements will be filled with a color dependent on the results (given by the function name, fun) calculated by the postprocessor (see Appendix D [Post2D], page 51). Additional arguments may be given to indicate how to combine the results within an element and to give the range of result values. Result combination (comb) may be specified as max, min, ave or an integer. These options will give either the maximum, minimum or average value of the results calculated within each element respectively. If an integer value (> 0) is given for comb then each element is subdivided into equal regions each of which are filled according to the interpolated result at the center of the subregion. Since result interpolation is used in this option results must have been processed at the nodes (see Section 2.6 [Results Processing - select], page 15). If this argument is not specified then max is assumed. Finally, a range of values may be given by specifying the minimum (rmin) and maximum (rmax) result values. If not given then the range is set to include the the full range of values calculated by the post-processor.

     'fill(result,temp,ave,0.0,100.0)'
     'fill(result,sigd,4)'

Command window xmin xmax ymin ymax window is used to specify world coordinates for the window. If no arguments are given then the window is selected using the mouse by pressing and holding the left mouse button and dragging the box until the region of interest is enclosed. The arguments are the minimum x (xmin), maximum x (xmax), minimum y (ymin) and maximum y (ymax) coordinates in that order.

     'window(-10.0,20.0,0.0,30.0)'

Command grid xinc yinc With grid an invisible grid is created. Subsequent node, element and boundary condition selection will be restricted to coordinates that fall on the grid points. The arguments are the x and y (or r and t if the coordinate system is set to polar, see Section 2.7 [Utility Commands - coord], page 16) grid increments (xinc, yinc) specified in world coordinates.

     'grid(0.5,0.25)'

Command find

find will reset the window to include the full model. The model will be replotted. There are no arguments to find.

Command zoom factor zoom will increase or decrease the window size dependent on the specified factor. A value of one will cause no change. Values less than one will shrink the window (zoom in) whereas values greater than one will expand the window (zoom out). If no argument is given then the window is expanded or shrunk interactively by pressing and holding the left mouse button and moving the mouse.

     'zoom(0.5)'

Command move xfract yfract move is used to move the window along the x and y directions. The arguments specify the x and y move in terms of screen fraction (xfract, yfract). Values of zero cause no change for that direction. A value of one will cause a shift of a full screen width or height (depending on the direction specified) in the positive direction (right or up). If no argument is given then the window is moved interactively by pressing and holding the left mouse button and moving the mouse.

     'move(-.5,0.0)'

Command clear

clear will clear the screen. There are no arguments to clear.

Command show

Command show "node" n flag Command show "elem" n flag Command show "group" name

show will plot (in complementary mode) the requested item(s). If flag is set to 1 then the corresponding node or element identification number (n) will be plotted next to the item. If the group option is specified all nodes in the group (specified by name) will be plotted.

     'show(group,part)'

Command hard file

hard initiates and terminates hardcopy output. When first issued a file will be opened for writing hardcopy output. If no argument is given and the screen is open (see Section 2.8 [Graphic Interactive Commands - open], page 25) then a file requester will be displayed. Subsequent plot (see Section 2.8 [Graphic Interactive Commands - plot], page 25) and fill (see Section 2.8 [Graphic Interactive Commands - fill], page 25) commands issued will result in hardcopy output (as well as screen output). Color Postscript commands are used as the output format and should result in a complete Postscript file readable by any Postscript capable software. If hard is issued again, hardcopy output will be closed allowing for multiple hardcopy invocations in any session.

     'hard(ram:model.ps)'

Command color id R G B

color allows for the specification of the screen (and hardcopy) color spectrum. The first argument (id) is the identification number of the color to be changed. It is recommended that only colors between identification number 4 and 15 (inclusive) be altered since colors 0 through 3 are pen colors used by Intuition. Also, in hardcopy output, only colors 4 through 15 are used (color 0 is always assumed to be white and colors 1 through 3 are black). The subsequent arguments (R, G, B) are integers between the values 0 and 15 (inclusive).

     'color(4,10,5,8)'

3 Discussion

The following sections discuss some of the finer details concerning the use of Ami2D.

3.1 Modeling Considerations

Since the stiffness matrix resulting from the finite element descretization is generally large, sparse and is always symmetric, storage space and computational requirements can be reduced by minimizing the bandwidth of the stiffness matrix. The bandwidth of the stiffness matrix is directly related to the maximum separation in node order in each element. It should be noted that the node ordering, not the assignment of node identification numbers, affects the bandwidth. For rectangular grids the minimum bandwidth can be achieved by defining the nodes in the direction defined by the shorter side. For non-rectangular grids it is not so apparent how to order the grid to achieve the minimum bandwidth. A rule of thumb is to try to keep the difference between the earliest defined node and latest defined node within any element to a minimum. The absolute worst ordered grid would be to have an element that contains both the first defined node and the last defined node.

It is also important to keep local node numbering within all elements ordered in a counterclockwise direction to avoid negative Jacobians. It is also good practice to number this way as a habit in order to maintain model consistency.

A node order optimizer called Opt2D is included with this distribution. For poorly ordered grids this optimizer can significantly reduce the bandwidth and therefore reduce memory requirements and execution times. However, for low aspect ratio rectangular grids with well ordered nodes the optimizer can increase the bandwidth. Documentation is provided for Opt2D.

3.2 Element Instability

All element configurations exhibit “spurious” modes (instabilities) which can typically be prevented through proper boundary condition specification. These modes can be described as zero energy modes where certain nontrivial solutions produce no energy. An example of a zero energy mode is rigid body motion (translation and/or rotation). Through proper application of displacement (Dirichlet) boundary conditions, rigid body motions can be prevented. However, some element configurations exhibit additional “spurious” modes some of which render the element unusable. Proper selection of element order and number of integration points can prevent these extra modes from occurring, however, over-integration is also undesirable due to the additional (typically unnecessary) computational requirements.

To determine if an element is usable one must solve the eigenvalue problem associated with the particular element configuration (that is find all eigenvalues and associated eigenvectors that satisfy the equation Ku = cu, where K is the element stiffness matrix and c and u are the eigenvalues and eigenvectors). The eigenvectors associated with any zero eigenvalues represent a basis defining (spanning) the null space of K (i.e. any vectors contained in this space may be represented as a linear combination of the basis vectors defining the space). That is these eigenvectors (and any linear combination of these vectors), if operated on by K, result in no reactive force (no energy produced). Applying these zero energy eigenvectors to the nodal coordinates one obtains a visual representation of the zero energy modes.

To illustrate, consider the vector valued displacement problem using the eight node element with a 2x2 integration rule. The number of zero energy modes, for this element, is four (found by subtracting the rank of the element stiffness matrix from its order). These modes correspond to the expected three rigid body motions (two translations and one rotation) plus an extra “spurious” mode. However, this element is still usable since this extra mode is not communicable (adjoining elements provide constraint against this mode). It can also be shown that for scalar valued problems (such as heat conduction problems) this element is over-integrated and exhibits no extra “spurious” modes.

For the same element order, but with a 3x3 integration rule instead, the number of zero energy modes is three which corresponds to the three possible rigid body motions. This element is in fact over-integrated thereby resulting in no extra “spurious” modes but at a cost of doing more calculations (and not necessarily gaining any accuracy).

To further illustrate, consider the vector valued displacement problem using the nine node element with a 2x2 integration rule. The number of zero energy modes, for this element, is six. The extra zero energy modes found for this element are all “spurious” modes some of which are communicable thereby rendering this element unusable. With a 3x3 integration rule this element is over-integrated but is the element of choice since the 2x2 integration rule results in an unusable element.

3.3 Post-Processing Accuracy

The accuracy of the results obtained from the finite element method can depend heavily on where evaluation of the solution is performed. The locations, within a particular element, where the results (based on solution derivatives) are the most accurate have been shown to coincide with the Gaussian quadrature points with the order of the Gaussian rule chosen to be the same as the order of the element. The capability to compute results at these locations is an option in the external post-processor (see Appendix D [Post2D], page 51 and Section 2.7 [Utility Commands - select], page 16) and should be used when the solution derivative is known to be changing rapidly across an element. Unfortunately, the Gaussian quadrature points are typically interior points which do not coincide with the nodal point locations. Therefore, if results must be output for nodal point locations it is suggested that the mesh be refined in areas where the solution derivatives are expected to vary significantly.

3.4 Graphic Interaction with Ami2D

Ami2D contains commands that allow you to graphically interact with the code through its ARexx port. These commands were discussed above in detail, but it should be apparent that more is needed to integrate your input with this graphical interface. Hence the inclusion of the ancillary codes - rexxcon and rexxbar. The code rexxcon simply provides a console window which accepts input in a command line shell environment. For Ami2D an ARexx macro is provided (called ‘ami2d.rexx’) that starts up Ami2D and uses rexxcon to open a console window on the Ami2D public screen. Commands typed in this console window are read by the ARexx macro and then issued to Ami2D. This allows you to type commands directly in the console without the need to address Ami2D or surround the commands with quotes. The ‘ami2d.rexx’ macro also allows any AmigaDOS command to be issued by preceding the command with a !. ARexx macros may be executed by preceding the macro name (with or without the ‘.rexx’ extension) with a !rx (assuming the system path includes a path to the rx command, usually the sys:REXXC directory).

The other code provided is rexxbar which ‘ami2d.rexx’ uses to open another window on the Ami2D screen. This window contains buttons that when selected cause other ARexx macros to be executed. The macros associated with these buttons in turn send commands to Ami2D.

Both rexxcon and rexxbar are completely tailorable. For rexxcon the window specification can be altered to any preferred size and placement. Also any valid console device can be specified (for example WShell or the conman console devices by William Hawes may be used thereby providing the full capabilities of those devices in the rexxcon window). The buttons and associated macros used in rexxbar can also be tailored as well as the size and placement of the window. A description of the interface as provided by the ‘ami2d.rexx’ macro would be futile because of this flexibility (for information on specific macros read the comments contained in the macro files). Also separate appendices are provided for rexxcon (see Appendix H [Rexxcon], page 59) and rexxbar (see Appendix I [Rexxbar], page 63) which give a general description of the codes for use in applications.

34 Ami2D 2.0

Figure 2 – ami2d.rexx flow diagram

A flow diagram illustrating the interaction of all the components set up by the ‘ami2d.rexx’ macro is shown in figure 2.

4 Example Problem

The following macro is included as a simple example to illustrate the use of an ARexx macro to generate a model. The advantages of using an ARexx macro are ease of debugging and the use of parametric variation to name a couple. This macro can be executed as any ARexx macro and will produce a model file ready to be solved by Lin2D. Ami2D is automatically invoked, by the macro, if it is not already running.

/* simple beam */
options results
address command
if ~show('ports', "AMI2D") then do
    'run ami2d:bin/ami2d ami2d:rexx/init'
    'waitforport AMI2D'
end
address ami2d
h = 0.5
L = 10.0
E = 10.0e6
nu = 0.3000
reset
problem 'struct'
plane
iso 1 E nu
do i=0 to 20
    xx = L*i/20
    node i+1 xx 0.0
    node i+31 xx h
end
do i=0 to 19
    quad4 i+1 1 i+1 i+2 i+32 i+31
end
dispx 1 0.0
dispy 1 0.0
dispx 31 0.0
dispy 31 0.0
forcy 51 (-100.0)
check
say result
save 'beam.dat'
exit

36 Ami2D 2.0

5 References

1. Hawes, William S., ARexx User’s Reference Manual

2. Becker, Eric B., Carey, Graham F., Oden, J. Tinsley, Finite Elements, An Introduction, Volume 1, Prentice-Hall Inc., 1981

3. Zienkiewicz, O.C., Taylor, R.L., The Finite Element Method, Volumes 1 & 2, Fourth Edition, McGraw-Hill Book Company, 1991

4. Schildt, H., C, The Complete Reference, Second Edition, Osborne McGraw-Hill, 1990 38 Ami2D 2.0

6 Acknowledgments

I acknowledge Commodore and the Amiga crew for producing the hardware and operating system of unmatched elegance that makes up the Amiga line of computers. The power and flexibility of this hardware and software combination makes possible the development of sophisticated and efficient programs that are only possible on this platform. I would also like to acknowledge William Hawes and Willy Langeveld for their contributions to the power of the Amiga’s operating system through the development of ARexx and the rexxmathlib, rexxarplib libraries. The addition of ARexx to the current operating system has, in my opinion, placed the Amiga’s operating system in the forefront of OS technology and provides unparalleled programming flexibility when combined with the truly multitasking environment of the Amiga computers. As a programmer and engineer I have found (especially with the development of Ami2D) that I have become very spoiled by the Amiga’s capabilities. There literally is no other computer platform which I would choose to attempt to produce code for.

I would also like to acknowledge Dr. Eric Becker and Dr. Linda Hayes, of the Aerospace Engineering and Engineering Mechanics Department of The University of Texas at Austin, for passing on the knowledge of the finite element method directly and indirectly through course work and research assistance. It is this knowledge that made possible the development of Lin2D and Nln2D. In fact, both codes started out as course term projects directed by Dr. Hayes and Dr. Becker.

Finally, I acknowledge the United States Air Force, Phillips Laboratory for providing the support and funding for my graduate work and hence the development of this software.

40 Ami2D 2.0

Appendix A Ami2D Macros

A.1 General Macros

The following are general macros for code startup, problem initialization, cleanup, etc. They can be found in “Ami2D:rexx”.

• ami2d (see section “Header” in ami2d.rexx).

• axisym (see section “Header” in axisym.rexx).

• bcsbar (see section “Header” in bcsbar.rexx).

• caxisym (see section “Header” in caxisym.rexx).

• cleanup (see section “Header” in cleanup.rexx).

• cstrain (see section “Header” in cstrain.rexx).

• cstress (see section “Header” in cstress.rexx).

• geombar (see section “Header” in geombar.rexx).

• helpbar (see section “Header” in helpbar.rexx).

• init (see section “Header” in init.rexx).

• mainbar (see section “Header” in mainbar.rexx).

• movebar (see section “Header” in movebar.rexx).

• plstrain (see section “Header” in plstrain.rexx).

• plstress (see section “Header” in plstress.rexx).

• procbar (see section “Header” in procbar.rexx).

• pstrain (see section “Header” in pstrain.rexx).

• pstress (see section “Header” in pstress.rexx).

• rexxcon (see section “Header” in rexxcon.rexx).

• solstat (see section “Header” in solstat.rexx).

• solvebar (see section “Header” in solvebar.rexx).

• tutorial (see section “Header” in tutorial.rexx).

• tutrbar (see section “Header” in tutrbar.rexx).

A.2 Geometry Macros

The following are macros for the creation and manipulation of geometry. They can be found in “Ami2D:macros/geom”.

• genline (see section “Header” in genline.rexx).

• genquad4 (see section “Header” in genquad4.rexx).

• genquad8 (see section “Header” in genquad8.rexx).

• genregion (see section “Header” in genregion.rexx).

• quad4 (see section “Header” in quad4.rexx).

• quad8 (see section “Header” in quad8.rexx).

• quad9 (see section “Header” in quad9.rexx).

• refine (see section “Header” in refine.rexx).

• transition (see section “Header” in transition.rexx).

• tri3 (see section “Header” in tri3.rexx).

• tri6 (see section “Header” in tri6.rexx).

A.3 Boundary Condition Macros

The following are macros for the creation and manipulation of boundary conditions. They can be found in “Ami2D:macros/bcs”.

• dispx (see section “Header” in dispx.rexx).

• dispy (see section “Header” in dispy.rexx).

• forcx (see section “Header” in forcx.rexx).

• forcy (see section “Header” in forcy.rexx).

• gendispx (see section “Header” in gendispx.rexx).

• gendispy (see section “Header” in gendispy.rexx).

• genpress (see section “Header” in genpress.rexx).

• press (see section “Header” in press.rexx).

• remdispx (see section “Header” in remdispx.rexx).

• remdispy (see section “Header” in remdispy.rexx).

• rempress (see section “Header” in rempress.rexx).

• remtemp (see section “Header” in remtemp.rexx).

• tract (see section “Header” in tract.rexx).

A.4 Solve Macros

These macros can be found in “Ami2D:macros/solve”.

• equ2d (see section “Header” in equ2d.rexx).

• lin2d (see section “Header” in lin2d.rexx).

• nln2d (see section “Header” in nln2d.rexx).

• nlsolve (see section “Header” in nlsolve.rexx).

• opt2d (see section “Header” in opt2d.rexx).

• rem2d (see section “Header” in rem2d.rexx).

• rlin2d (see section “Header” in rlin2d.rexx).

• rnln2d (see section “Header” in rnln2d.rexx).

• solve (see section “Header” in solve.rexx).

A.5 Process Macros

The following are macros for post-processing results. They can be found in “Ami2D:macros/process”.

• fillres (see section “Header” in fillres.rexx).

• plotres (see section “Header” in plotres.rexx).

• post2d (see section “Header” in post2d.rexx).

• range (see section “Header” in range.rexx).

• rpost2d (see section “Header” in rpost2d.rexx).

• switch (see section “Header” in switch.rexx).

A.6 Help Macros

These macros can be found in “Ami2D:macros/help”.

• help (see section “Header” in help.rexx).

• read (see section “Header” in read.rexx).

• undo (see section “Header” in undo.rexx).

44 Ami2D 2.0

Appendix B Lin2D

B.1 Introduction to Lin2D

Lin2D is a general linear solver developed to handle “plane” and axisymmetric two dimensional finite element analysis problems. It is a fairly general capability in the sense that a wide variety of two dimensional problems can be handled by Lin2D limited only by computational resources. Specific attention was given to efficient memory and resource management, however, the minimum recommended amount of memory needed to solve moderate problems, using Lin2D, is 6 megabytes (although simple problems can be run with considerably less). A hard disk is also recommended.

It is important to note that any engineer, planning to use a finite element code for actual application, understand fully the concepts and implementation of the finite element method. Therefore, the prospective user should consider an in-depth study of the method and ideally some training. This document should not be considered appropriate for training users in the use of the finite element method.

The main features of Lin2D are as follows:

• runs as a background task

• two-dimensional plane or axisymmetric problems

• uses ARexx macro language

• linear and quadratic elements available

• no limit on number of nodes, elements, materials, or boundary conditions (only limited by memory)

• no need to specify problem size (determined at run time)

• choice of Dirichlet (constraint) or Neumann (flux), point or distributed boundary conditions • symmetric banded matrix storage format

In general the command line syntax for executing Lin2D:

         -> [run] Lin2D [script]

where script is the name of an input ARexx script to be processed. If no script is specified then the code will wait until it receives a command, presumably from a subsequently executed ARexx command or script.

Lin2D accepts ARexx commands passed to its message port (address lin2d). Commands for Lin2D, placed in an ARexx macro, consist of a command keyword followed by arguments. The arguments may be separated from the command keyword with parentheses and delimited with commas (analogous to a function call) or may be separated (and delimited) with spaces. If parentheses and commas are used then the command line must be surrounded by single quotes or else ARexx will interpret the command as a library function call (rather than a command meant for the host). The general rule is to surround expressions (which can be single variables), which are to be interpreted internally by Lin2D, with single quotes. Otherwise, expressions (and variables) will be interpreted by ARexx before being sent to Lin2D.

B.2 Model Requirements

The constitutive law implemented in Lin2D (relating stress and strain in structural problems, for example) consists of a linear matrix operator with up to ten independent constants. These constants are input in the mat command in Ami2D as the material coefficients. For structural problems the components of stress and strain, relevant to plane or axisymmetric problems, are the three normal components plus the in-plane shear component. This requires that the material matrix operator be a four by four matrix. This results in sixteen constants but, due to elastic symmetry, only ten of these constants are independent. The material coefficients allow for specification of materials ranging from isotropic (properties invariant to material direction) to monoclinic (properties symmetric about one plane). The coefficients are specified in diagonal order and the matrix is symmetric. In other words, if the coefficients are arranged in matrix form they would appear as follows.

                 C0  C4  C7  C9
                 C4  C1  C5  C8
                 C7  C5  C2  C6
                 C9  C8  C6  C3

Body forces are also input with the mat command. Lin2D treats the two sets of body forces differently. The first set of body force terms are for body forces arising from internal energy. For example, thermal strain in a material develops as a result of a change in temperature in the material which can be treated as a body force due to a change in internal energy. In this case the body force (thermal strain) is computed through the following equation:

                 eT[] = f1[]*(Ti - Tref)

where f1[] is the first set of body force coefficients (thermal coefficients of expansion, one for each geometric degree of freedom), Tref is the reference value (temperature), and Ti is the computed value (temperature found from a previous heat transfer analysis).

The second set of body force terms are for body forces arising from potential energy such as conservative force fields (gravity or acceleration being an example). Furthermore, for axisymmetric problems the radial component of this conservative body force is multiplied by the radial location. This, for example, allows for a radial force component that depends on the radial acceleration arising from the steady state rotation of an axisymmetric body. In this case the body forces are computed through the following equations:

                 F[r] = f2[r]*r^2*density
                 F[a] = f2[a]*r*density

where f2[r] is the first (radial) body force coefficient in the second set (representing the angular velocity), f2[a] is the second (axial) coefficient (which represents an axial acceleration), r is the radial location, and density may be either a constant (input by specifying a negative reference value) or a computed value (obtained from a previous diffusion analysis and setting the reference value to zero).

B.3 Lin2D Commands

The commands are functionally equivalent to commands available in Ami2D. Additional commands are also provided which are described in the following sections.

• save (see Section 2.7 [Utility Commands - save], page 16)

• read (see Section 2.7 [Utility Commands - read], page 16)

• reset (see Section 2.7 [Utility Commands - reset], page 16)

• version (see Section 2.7 [Utility Commands - version], page 16)

• stop (see Section 2.7 [Utility Commands - stop], page 16)

• why (see Section 2.7 [Utility Commands - why], page 16)

Command formkf iprint

formkf forms the stiffness matrix and load vector. The stiffness matrix and load vector are assembled from the individual element contributions which results in a linear system of equations to be subsequently solved. The only argument to this command is a print flag (iprint). A value of 1 indicates that the stiffness matrix and load vector will be printed to the standard output. This is not recommended for problems resulting in large systems. A value of 0 will result in no matrix/vector output (the default setting).

     'formkf(0)'

Command solve iprint solve will attempt to solve the system assembled using the formkf command (see Section B.3 [Lin2D Commands - formkf], page 47). Simple checks of the model are performed at various stages, but this does not insure that the system can be solved. The user must pay special attention to correctness of model geometry and boundary conditions. If the system is not solvable it is most probably due to errors in the geometry and/or boundary conditions. The only argument to this command is a print flag (iprint). A value of 1 indicates that the solution vector will be printed to the standard output. This is not recommended for large problems. A value of 0 will result in no solution output (the default setting).

     'solve(0)'

Command status

status allows the user to check on the status of the currently executing command. A descriptive string will be returned to the calling macro. There are no arguments to

status.

Command abort

abort will cause the currently executing command to abort. There are no arguments

to abort.

Appendix C Nln2D

This solver is equivalent to Lin2D except that it is restricted – results are only valid for – structural analysis problems where large displacements (and/or rotations) are expected, but small strain theory still applies. A good example would be the large deflection of a thin cantilever beam. The functional difference between Nln2D and Lin2D is the solution process. The first iteration through formkf and solve will result in a linear solution (equivalent to the solution given by Lin2D). Subsequent executions of formkf and solve will produce results that represent a lower total energy state (the internal energy approaches the external energy of the system). After “enough” iterations have been performed the total energy should be zero (that is an equilibrium state should have been reached). The command formkf returns the maximum (absolute value) nodal residual force in the system. This value can be checked against a tolerance value (typically around 0.01, but depends on loading conditions) as a stopping criteria. Also, the solve command returns the maximum (absolute value) change in nodal displacement. This value may also be checked against a tolerance value (typically around 0.0001) as a stopping criteria. The following is an example script showing a solution procedure.

     /* example script for nln2d */
     options results
     address nln2d 'read(ram:temp.dat)'
     do i=0 to 20
         address nln2d 'formkf'
         address nln2d 'solve'
         parse var result du
         if du < 1e-4 then leave
     end
     address nln2d 'save(ram:temp.dat)'
     exit

This code can be more effectively used when run in conjunction with Ami2D. For instance, intermediate results can be viewed graphically thereby given a visual indication of solution convergence. It is even possible (and often desirable) to assemble an animation consisting of these intermediate results. This animation would show, very effectively, the convergence process.

Also, convergence of the solution may require incremental loading which can be accomplished with the aid of Ami2D. This would be done by applying a fraction of the appropriate load(s), performing an iterative solution with Nln2D until convergence, then increasing the load fraction using Ami2D and repeating the solution procedure. This whole process is repeated until the full load is reached.

Currently, only a linear elastic stress-strain material law is implemented thereby restricting problems to those where small strains are expected. However, future additional material constitutive laws will be implemented thereby extending the code applicability to more general nonlinear problems.

Appendix D Post2D

D.1 Introduction to Post2D

Post2D is a general two dimensional finite element solution post-processor. The main features of Post2D are as follows:

• runs as a background task

• uses ARexx macro language

• definable post-processing functions

In general the command line syntax for executing Post2D:

         -> [run] Post2D [script]

where script is the name of an input ARexx script to be processed. If no script is specified then the code will wait until it receives a command, presumably from a subsequently executed ARexx command or script.

Post2D accepts ARexx commands passed to its message port (address post2d). Commands for Post2D, placed in an ARexx macro, consist of a command keyword followed by arguments. The arguments may be separated from the command keyword with parentheses and delimited with commas (analogous to a function call) or may be separated (and delimited) with spaces. If parentheses and commas are used then the command line must be surrounded by single quotes or else ARexx will interpret the command as a library function call (rather than a command meant for the host). The general rule is to surround expressions (which can be single variables), which are to be interpreted internally by Post2D, with single quotes. Otherwise, expressions (and variables) will be interpreted by ARexx before being sent to Post2D.

D.2 Post2D Commands

The commands are functionally equivalent to commands available in Ami2D and Lin2D. Additional commands are also provided which are described in the following sections.

• problem (see Section 2.2 [Problem Type - problem], page 9)

• save (see Section 2.7 [Utility Commands - save], page 16)

• read (see Section 2.7 [Utility Commands - read], page 16)

• reset (see Section 2.7 [Utility Commands - reset], page 16)

• version (see Section 2.7 [Utility Commands - version], page 16)

• stop (see Section 2.7 [Utility Commands - stop], page 16)

• set (see Section 2.7 [Utility Commands - set], page 16)

• get (see Section 2.7 [Utility Commands - get], page 16)

• why (see Section 2.7 [Utility Commands - why], page 16)

• status (see Section B.3 [Lin2D Commands - status], page 47)

• abort (see Section B.3 [Lin2D Commands - abort], page 47)

Command post fun location Given a solution calculated by a solver (see Appendix B [Lin2D], page 45 and Appendix C [Nln2D], page 49) post will post-process the solution over the complete model. Any previously defined function (see Section 2.7 [Utility Commands - set], page 16) may be given in the first argument (fun). The second argument (location) indicates where the solution will be evaluated in each element. If gauss is specified then the solution will be processed at the Gaussian quadrature points. If node is specified then processing will occur at the node locations. Finally, if ave is specified then the solution will be processed at the nodes and averaged across element boundaries (unless it is a material boundary). If this argument is not given then gauss is assumed. More accurate stress/strain results (for that matter any result based on solution derivatives) can be expected using the gauss option. If no arguments are given then all selected (see Section 2.6 [Results Processing - select], page 15) functions will be post-processed.

     'post(sig1)'

Appendix E Equ2D

Given a two-dimensional finite element mesh (stored in the IFF format currently used by Ami2D) Equ2D will equivalence nodes that fall within a specified tolerance apart. Either an inclusion or exclusion node group may be given to restrict the equivalence operation.

The equivalence operation is typically used as a modeling tool to “weld” separate parts together or to close gaps. This operation is particularly useful during interactive modeling since complex assemblies are easier to build from parts.

The command line syntax for Equ2D is:

         -> [run] equ2d [-igroup] [-xgroup] [-ttol] <input> [output]

where input is the input data file containing the finite element data (in the form produced by the save command in Ami2D). This input data file is a required argument. The output data file, if specified, will be the name of the file that will contain the equivalenced finite element data. If not specified then the data will be written back to the input file (thereby overwriting the previous data). If the -i option is used then group specifies the group containing the nodes to be included in the equivalence search. Likewise, if the -x option is used then group specifies the group containing nodes to be excluded from the equivalence search. If the -t option is given then tol specifies the tolerance to be used to determine equivalence (the default is 1.0e-5).

54 Ami2D 2.0

Appendix F Opt2D

Opt2D is a node order optimization program for arbitrary two dimensional finite element meshes. The algorithm used to optimize the mesh is fairly simplistic but may result in a smaller bandwidth for some problems. For simple rectangular meshes, if the node ordering is consistent, then Opt2D will probably give a node ordering with a bandwidth that is larger than the original. However, for irregular meshes, very high aspect ratio meshes, or inconsistently ordered meshes, Opt2D can reduce the bandwidth significantly. A side effect of Opt2D is that all unreferenced nodes will be removed resulting in a further reduction in model size and memory requirements.

The command line syntax for Opt2D is:

         -> [run] opt2d [-nelement] <input> [output]

where input is the input data file containing the finite element data (in the form produced by the save command in Ami2D). This input data file is a required argument. The output data file, if specified, will be the name of the file that will contain the optimized finite element data. If not specified then the optimized data will be written back to the input file (thereby overwriting the previous data). If the -n option is used then element specifies the identification number of the element where the optimization search is to begin. Proper selection of the starting element can dramatically improve the resulting optimization.

56 Ami2D 2.0

Appendix G Rem2D

Rem2D is a simple code to remove all unreferenced nodes from a model resulting in a reduction in model size and memory requirements without a reordering of the node numbers.

The command line syntax for Rem2D is:

         -> [run] rem2d <input> [output]

where input is the input data file containing the finite element data (in the form produced by the save command in Ami2D). This input data file is a required argument. The output data file, if specified, will be the name of the file that will contain the optimized finite element data. If not specified then the optimized data will be written back to the input file (thereby overwriting the previous data).

58 Ami2D 2.0

Appendix H Rexxcon

H.1 Introduction to Rexxcon

rexxcon is a very simple ARexx host program who’s only function is to read lines from a console and return them to the calling macro. The primary function of this program is to serve as an interactive front-end to other ARexx hosts.

The command line syntax for rexxcon is:

         -> [run] rexxcon [-hhostname] [script]

where script is the name of an input ARexx script to be processed. If no script is specified then the code will wait until it receives a command, presumably from a subsequently executed ARexx command or script. The -h option will set the rexxcon host address to hostname.

H.2 Example Script for Rexxcon

Commands for rexxcon, placed in an ARexx macro, consist of a command keyword followed by arguments. The arguments may be separated from the command keyword with parentheses and delimited with commas (analogous to a function call) or may be separated (and delimited) with spaces. If parentheses and commas are used then the command line must be surrounded by single quotes or else ARexx will interpret the command as a library function call (rather than a command meant for the host). The general rule is to surround expressions (which can be single variables), which are to be interpreted internally by rexxcon, with single quotes. Otherwise, expressions (and variables) will be interpreted by ARexx before being sent to rexxcon. For example the lines below show a sequence of ARexx commands for rexxcon.

     /* this is an ARexx macro for rexxcon */
     options results
     parse arg host
     hostname = upper(host)
     address command
     if ~show('ports',hostname) then do
         'run ami2d:bin/'host
         'waitforport' hostname
     end

address VALUE hostname
hostname = 'RXC_'hostname
say hostname
if ~show('ports',hostname) then do
    'run ami2d:bin/rexxcon -h'hostname
    'waitforport' hostname
end
address VALUE hostname
'alias quit=stop'
'open(cnc,0,-50,-52,50,'host'/noclose,'host')'
do forever
    'read'
    comm = result
    drop result
    address
    comm
    address
    if comm = 'stop' then leave
    if result ~= "RESULT" then 'write('result')'
end
'stop'
exit

The above example is in fact an ARexx script that could used to run a code (with an ARexx port) interactively. It illustrates the use of rexxcon as a “front end” to ARexx hosts.

H.3 Rexxcon Commands

Command open conspec left top width height flags screen open will open the rexxcon console window. The command requires arguments defining the console specification. The arguments are the console device name (conspec, without the colon), left (or right) edge offset, top (or bottom) edge offset, width (can be relative to screen width), height (can be relative to screen height), flags and public screen name. The edge offsets will be relative to the left and/or top edges if positive or zero otherwise they are relative to the right and/or bottom edges respectively. The width and/or height, if positive, directly specify the window width and/or height. If they are negative then they will be relative to the screen width and/or height. If the public screen name is not specified then the window will be opened on the Workbench screen.

     'open(con,0,1,640,200,rexxcon/noclose)'

Command close

close will close the console window.

Command alias name expr alias is used to create aliases for read-in (see Section H.3 [Rexxcon Commands - read], page 60) commands. Commands (the first word of a read-in string) that match an alias will be replaced with the assigned string. The rest of the typed in string is just appended verbatim.

     'alias quit=stop'

Command read

read will read a line from the rexxcon console (or file). The line will be returned in the ARexx variable RESULT if options results was specified in the ARexx macro. If the first word of the read-in string matches any defined aliases (see Section H.3 [Rexxcon Commands - alias], page 60) then that word will be replaced with the string assigned to the alias before being passed to the calling macro.

Command write string write will write a string to the rexxcon console.

     'write("this line")'

Command prompt string

The prompt given when a read command is issued may be set with prompt. By default the prompt is ->.

     'prompt("by your command: ")'

Command stop

stop will close the window and exit the program.

62 Ami2D 2.0

Appendix I Rexxbar

I.1 Introduction to Rexxbar

rexxbar is a very simple ARexx host program who’s only function is to set up a window with gadgets and to wait for gadget selection. If a gadget is selected then a macro associated with the gadget is executed. The primary function of this program is to serve as an interactive front-end to other ARexx hosts.

The command line syntax for rexxbar is:

         -> [run] rexxbar [-prexxhost] [-hhostname] [script]

where script is the name of an input ARexx script to be processed. If no script is specified then the code will wait until it receives a command, presumably from a subsequently executed ARexx command or script. The -p option is used to specify an alternate rexx host (aside from the ARexx interpreter) to issue commands to directly. The -h option will set the rexxbar host address to hostname.

I.2 Example Script for Rexxbar

Commands for rexxbar, placed in an ARexx macro, consist of a command keyword followed by arguments. The arguments may be separated from the command keyword with parentheses and delimited with commas (analogous to a function call) or may be separated (and delimited) with spaces. If parentheses and commas are used then the command line must be surrounded by single quotes or else ARexx will interpret the command as a library function call (rather than a command meant for the host). The general rule is to surround expressions (which can be single variables), which are to be interpreted internally by rexxbar, with single quotes. Otherwise, expressions (and variables) will be interpreted by ARexx before being sent to rexxbar. For example the lines below show a sequence of ARexx commands for rexxbar.

     /* example script for rexxbar */
     address command
     if ~show('ports',"RXB_AMI2D") then do
         'run ami2d:bin/rexxbar -hRXB_AMI2D -pAMI2D'
         'waitforport RXB_AMI2D'

end
address rxb_ami2d
'button(1,equ2d,ami2d:macros/solve/equ2d)'
'button(2,pbnd,"plot bound")'
'button(4,rem2d,ami2d:macros/solve/rem2d)'
'button(5,opt2d,ami2d:macros/solve/opt2d)'
'button(7,lnsol,ami2d:macros/solve/solve)'
'button(8,nlsol,ami2d:macros/solve/nlsolve)'
'button(9,pdef,"plot deform scale")'
'button(10,fdef,"fill deform scale")'
'text(12,"scale:")'
'string(13,1.0,"set scale %s")'
'open(-68,63,68,-158,AMI2D,solve)'
exit

I.3 Rexxbar Commands

Command open left top width height screen title macro open will open the rexxbar window. The command accepts arguments defining the window specification. The arguments are left (or right) edge offset, top (or bottom) edge offset, width (can be relative to screen width), height (can be relative to screen height), flags and public screen name. The edge offsets will be relative to the left and/or top edges if positive or zero otherwise they are relative to the right and/or bottom edges respectively. The width and/or height, if positive, directly specify the window width and/or height. If they are negative then they will be relative to the screen width and/or height. If the public screen name is not specified then the window will be opened on the Workbench screen. A window title may also be given which will result in a draggable window. The macro argument, if given, specifies a macro that is to be executed if the window position is changed. This allows for programmatic control of a group of windows (depending on the position of a draggable window other windows can be made to follow, for example).

If any size arguments are not given and the window has not been previously opened then the window will be automatically sized. If the width is not given then the window width will be set to accommodate the largest length string specified for a button. If the height is not given then the window height will be set to be able to include all specified gadgets. Additionally, if the left edge is not specified then the window will be positioned flush with the right edge of the screen. Likewise, if the top edge is not specified then the window will be positioned flush with the bottom edge of the screen. Note that this automatic sizing is dependent on the font used which will always be set to the font specified for the system default font (set in the font preferences program). If the window has been previously opened then all specified arguments will result in a resizing and/or repositioning of the window. If no arguments are given and the window was previously opened then the window position and size will be returned in RESULT.

     'open(-52,0,52,0,AMI2D)'
     'open(,0,,,WorkBench,title,"movemacro")'

Command close

close will close the window (if one is currently open).

Command button id text macro button will set up a button gadget. The arguments are the button number (id, also used for placement), button text and macro specification. If the button text and macro are not specified and the gadget already exists then the text will be returned as a result (if options results is specified in the issuing macro). Additionally, if the text is specified and the gadget exists then the button text will be replaced with the new text. This allows a macro to set the condition of the gadget and can be used to link gadget actions together. With a macro defined if the gadget is selected the macro name is first searched for as an external ARexx macro. If the external program is not found (either in the current directory or in the REXX: directory) then the macro string is passed to the alternate host message port (see Section I.1 [Introduction to Rexxbar], page 63).

     'button(2,wind,ami2d:macros/window)'

Command cycle id label macro cycle will set up a cycle gadget. The arguments are the cycle identification number (id, also used for placement), cycle label and macro specification (optional). Each subsequent command with the same identification number will add the label to the list of labels for the cycle gadget. This will result in a gadget that when selected will cycle through the list of labels. If the cycle label and macro are not specified and the gadget already exists then the currently visible label will be returned as a result (if options results is specified in the issuing macro). Additionally, if the label is specified and the gadget exists with the label already defined then the gadget will be set to that label. This allows a macro to set the condition of the gadget and can be used to link gadget actions together. With a macro defined if the gadget is selected the macro name is first searched for as an external ARexx macro. If the external program is not found (either in the current directory or in the REXX: directory) then the macro string is passed to the alternate host message port (see Section I.1 [Introduction to Rexxbar], page 63). Also, the macro string may contain a %s which will be replaced with the current cycle label before issuing the macro string for execution.

     'cycle(2,sig1)'
     'cycle(2,sig2)'
     'cycle(2,sigd)'

Command radio id label macro radio will set up a radio gadget (actually a sequence of mutually exclusive buttons). The arguments are the radio identification number (id, also used for placement), radio label and macro specification (optional). Each subsequent command with the same identification number will add the label to the list of labels for the radio gadget. This will result in a sequence of gadgets that are selectable but only one will be selected (active) at any time. If the radio label and macro are not specified and the gadget already exists then the currently selected label will be returned as a result (if options results is specified in the issuing macro). Additionally, if the label is specified and the gadget exists with the label already defined then the gadget will be set to that label. This allows a macro to set the condition of the gadget and can be used to link gadget actions together. With a macro defined if the gadget is selected the macro name is first searched for as an external ARexx macro. If the external program is not found (either in the current directory or in the REXX: directory) then the macro string is passed to the alternate host message port (see Section I.1 [Introduction to Rexxbar], page 63). Also, the macro string may contain a %s which will be replaced with the current radio label before issuing the macro string for execution.

     'radio(3,max)'
     'radio(3,min)'
     'radio(3,ave)'

Command checkbox id text macro checkbox will set up a checkbox gadget. The arguments are the checkbox number (id, also used for placement), checkbox text and macro specification. If the checkbox text and macro are not specified and the gadget already exists then the active state will be returned as a result (0 for not selected or 1 for selected). Additionally, if the text is specified and the gadget exists then the active state will be toggled. This allows a macro to set the condition of the gadget and can be used to link gadget actions together.

With a macro defined if the gadget is selected the macro name is first searched for as an external ARexx macro. If the external program is not found (either in the current directory or in the REXX: directory) then the macro string is passed to the alternate host message port (see Section I.1 [Introduction to Rexxbar], page 63). Also, the macro string may contain a %d which will be replaced with the current checkbox status before issuing the macro string for execution.

     'checkbox(5,auto)'

Command string id text macro string will set up a string gadget. The arguments are the string number (id, also used for placement), string text and macro specification. If the string text and macro are not specified and the gadget already exists then the current string text will be returned as a result. Additionally, if the text is specified and the gadget exists then the string text will be replaced with the new text. This allows a macro to set the condition of the gadget and can be used to link gadget actions together. With a macro defined if the gadget is selected the macro name is first searched for as an external ARexx macro. If the external program is not found (either in the current directory or in the REXX: directory) then the macro string is passed to the alternate host message port (see Section I.1 [Introduction to Rexxbar], page 63). Also, the macro string may contain a %s which will be replaced with the current string text before issuing the macro string for execution.

     'string(5,1.0,"set scale %s")'

Command text id label text will set up a text gadget. The arguments are the text number (id, also used for placement) and the text label. If the text label is not specified and the gadget already exists then the current text label will be returned as a result. Additionally, if the label is specified and the gadget exists then the text label will be replaced with the new label. This allows a macro to set the condition of the gadget and can be used to link gadget actions together. Note, due to a bug text gadgets must be specified twice, once before the open command is given and again after.

     'text(4,scale)'
     'open(-52,0,52,0,AMI2D)'
     'text(4,scale)'

Command slider id level min max macro slider will set up a slider gadget. The arguments are the slider number (id, also used for placement), initial slider level, slider min value, slider max value and macro specification. If the slider level and subsequent arguments are not specified and the gadget already exists then the current level will be returned as a result (if options results is specified in the issuing macro). Additionally, if the level is specified and the gadget exists then the slider level will be set to the new level. This allows a macro to set the condition of the gadget and can be used to link gadget actions together. With a macro defined if the gadget is selected the macro name is first searched for as an external ARexx macro. If the external program is not found (either in the current directory or in the REXX: directory) then the macro string is passed to the alternate host message port (see Section I.1 [Introduction to Rexxbar], page 63).

     'slider(3,0,-10,10,ami2d:macros/slider)'

Command signal port

This command allows specification of an ARexx port to be notified of gadget selection. Specifically, if this command is issued, with a port argument, then all gadget selections will result in a message being sent to this port prior to execution of any macro attached to the gadget. If the program receiving this message does not want the macro to be executed then a reply is issued with a non-zero return code. Otherwise, the associated macro will be executed and another message will be issued to the port to indicate completion of the macro (successful or not). A good example of use of this command is illustrated by the macro ‘tutorial.rexx’ which makes use of this capability by limiting user interaction.

Command disable

This command disables the rexxbar which can be reactivated by the enable command (see Section I.3 [Rexxbar Commands - enable(rexxbar)], page 64).

Command enable

This command enables the rexxbar which was previously disabled by the disable command (see Section I.3 [Rexxbar Commands - disable(rexxbar)], page 64).

Command stop

stop will close the window and exit the program.

Concept Index 69

Concept Index

A

Aborting a command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 Aborting an interactive command . . . . . . . . . . . . . . . . 25 Aliases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22, 24 Ami2d.rexx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7, 33 Amiga . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 ARexx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 ARexx macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7, 33 Assembly status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 Assumptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Axisymmetry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

B

Bandwidth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 Binary file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Body force coefficients . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Boundary condition direction . . . . . . . . . . . . . . . . . 13, 14 Boundary condition kind . . . . . . . . . . . . . . . . . . . . . . 13, 14 Boundary condition specification . . . . . . . . . . . . . . . . . 13 Boundary condition type . . . . . . . . . . . . . . . . . . . . . . 13, 14 Buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

C

Cartesian coordinate system . . . . . . . . . . . . . . . . . . . . . . 17 Color setting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 Command line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 Command line syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Commodore . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 Conditions for copying Ami2D . . . . . . . . . . . . . . . . . . . . . 1 Console window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 Constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 Coordinate pair . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Coordinate system origin . . . . . . . . . . . . . . . . . . . . . . . . . 17 Copying conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Coupling analyses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

D

Deformation scale . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26, 27 Deformed model filled plot . . . . . . . . . . . . . . . . . . . . . . . 27 Deformed model plot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 Degrees of freedom . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Directory path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Display mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 Distributed boundary condition information . . . . . . 19 Distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

E

Element identification number . . . . . . . . . . . . . . . . 12, 14 Element information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 Element side number . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Error message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17, 48 Exchanging data between macros . . . . . . . . . . . . . . . . . 20 Expression evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

F

Features of Ami2D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Finite element analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Free boundaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 Function information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20, 22, 24

G

Gaussian quadrature . . . . . . . . . . . . . . . . . . . . . . . . . . 15, 32 Graphical interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 Grid points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 Group addition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 Group deletion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 Group information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 Group removal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 Group translation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

H

Hardcopy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

I

Integration points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

70 Ami2D 2.0

Integration rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 Interactivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Interchange File Format (IFF) . . . . . . . . . . . . . . . . . . . . 16 Isoparametric shape functions . . . . . . . . . . . . . . . . . . . . 12

L

Lamina properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Laminate properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Load vector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 Local coordinates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Local node number . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

M

Material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 Material boundaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 Material identification number . . . . . . . . . . . . 10, 11, 12 Material information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 Material properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Matrix solver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 Memory deallocation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Model checks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 Model filled plot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 Model geometry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Model information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 Model integrity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Model plot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 Model statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Mouse pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12, 13, 14

N

Negative Jacobians . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 Node identification number . . . . . . . . . . . . . . . . . . . 12, 13 Node information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 Node order . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Node order optimizer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

P

Phillips Laboratory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 Plane assumption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Plotting boundary conditions . . . . . . . . . . . . . . . . . . . . . 26 Plotting results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 Point boundary condition information . . . . . . . . . . . . 19 Polar coordinate system . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Post-process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Post-process solution data . . . . . . . . . . . . . . . . . . . . . . . . 20 Postscript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 Pre-defined variables . . . . . . . . . . . . . . . . . . . . . . . . . . 20, 24 Problem kind . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Public screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25, 26

R

Reading groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 Reference values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Reset window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 Restriction of problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Result information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 Result processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 Rexxbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 Rexxcon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 Rigid body motion . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17, 31 Root window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25, 26

S

Saving groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 Software warranty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Solution accuracy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 Solution evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Solution information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 Solution status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 Starting a new problem . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Stiffness coefficients . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Stiffness matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 Stopping the code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 Storing intermediate data . . . . . . . . . . . . . . . . . . . . . . . . 20 System assembly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

T

Transversely isotropic material . . . . . . . . . . . . . . . . . . . 11

U

United States Air Force . . . . . . . . . . . . . . . . . . . . . . . . . . 39 University of Texas at Austin . . . . . . . . . . . . . . . . . . . . . 39 User’s responsibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

Concept Index 71

V

Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20, 22, 24 View window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

W

Window information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 Window offsets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 Window shift . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 Window size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 World coordinates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

Z

Zero energy modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

72 Ami2D 2.0 Command Index 73

Command Index

A

abort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 alias . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24, 61 axisym . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

B

button . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65

C

cd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 check . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 checkbox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 clear . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 close . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26, 61, 65 color . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 coord . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 cycle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65

D

dbc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 disable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68

E

elem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 enable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 eval . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

F

fill . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27, 28 find . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 formkf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

G

get . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 grid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22, 23, 24

H

hard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

I

info . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18, 19, 20

L

lam . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

M

mat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 move . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

N

node . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

O

open . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25, 60, 64

P

pbc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 plane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 plot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26, 27 post . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 prompt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61

R

radio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 read . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16, 61 reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

S

save . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 select . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 show . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 slider . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 solve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 stop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20, 61, 68

74 Ami2D 2.0

string . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67

T

text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67

V

version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 view . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

W

why . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 write . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61

Z

zoom . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

Table of Contents

Ami2D Copying Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Disclaimer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2 Command Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

2.1 Macros and Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.2 Problem Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.3 Materials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.4 Geometry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 2.5 Boundary Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 2.6 Results Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 2.7 Utility Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 2.8 Graphic Interactive Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

3 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

3.1 Modeling Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 3.2 Element Instability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 3.3 Post-Processing Accuracy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 3.4 Graphic Interaction with Ami2D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

4 Example Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 5 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 6 Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 Appendix A Ami2D Macros . . . . . . . . . . . . . . . . . . . . . . . . 41

A.1 General Macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 A.2 Geometry Macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 A.3 Boundary Condition Macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 A.4 Solve Macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 A.5 Process Macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 A.6 Help Macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 ii Ami2D 2.0

Appendix B Lin2D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

B.1 Introduction to Lin2D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 B.2 Model Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 B.3 Lin2D Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

Appendix C Nln2D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 Appendix D Post2D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

D.1 Introduction to Post2D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 D.2 Post2D Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

Appendix E Equ2D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 Appendix F Opt2D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 Appendix G Rem2D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 Appendix H Rexxcon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

H.1 Introduction to Rexxcon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 H.2 Example Script for Rexxcon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 H.3 Rexxcon Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60

Appendix I Rexxbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63

I.1 Introduction to Rexxbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 I.2 Example Script for Rexxbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 I.3 Rexxbar Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64

Concept Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 Command Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73